package org.shushan.web.demo.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import org.shushan.framework.core.mapstruct.ReqMapstruct;
import org.shushan.framework.core.page.Request;
import org.shushan.web.demo.entity.ElasticTest;

import java.io.Serializable;

/**
 * (TUser)请求实体
 * @author zhigang.li
 * @email 2429967859@qq.com
 * @since 2023-09-16 22:25:41
 */
@Getter
@Setter
@Schema(name = "ElasticTestDto")
public class ElasticTestDto implements ReqMapstruct<ElasticTest>,Serializable, Request<Long> {
    private static final long serialVersionUID = -89789232999208001L;
    @Schema(name = "id",description = "主键id")
    private Long id;
    @Schema(name = "traceId",description = "追踪id")
    private String traceId;
    @Schema(name = "logContext",description = "logContext")
    private String logContext;
    @Schema(name = "logRemark",description = "logRemark")
    private String logRemark;

    @Override
    public ElasticTest toEn() {
        return ElasticTestDtoMapper.INSTANCE.toEn(this);
    }

    @Mapper
    interface ElasticTestDtoMapper {
        ElasticTestDtoMapper INSTANCE = Mappers.getMapper(ElasticTestDtoMapper.class);
        ElasticTest toEn(ElasticTestDto elasticTestDto);
    }
}

